﻿set showtabline=1 winaltkeys=no tabpagemax=96
set guioptions+=h guioptions-=T guioptions-=r guioptions-=l guioptions-=m guioptions-=R
"set guicursor+=
if !&diff
	set guioptions-=b guioptions-=L
else
	set guioptions+=b guioptions+=L
endif

"auto BufEnter * let &titlestring = expand("%:p")

"set title titlestring=%<%F%=%l/%L-%P titlelen=70
"set title titlestring=千里暮云平\ %t%(\ %M%)%(\ (%{expand(\"%:~:.:h\")})%)%(\ %a%)
set title titlestring=山横春烟\ %t%(\ %M%)%(\ (%{expand(\"%:~:.:h\")})%)%(\ %a%)

"function! MaximizeWindow()
"	    silent !wmctrl -r :ACTIVE: -b add,maximized_vert,maximized_horz
"endfunction

if has('gui_gtk2')
	set guifont=DejaVu\ Sans\ Mono\ 16
	set guifontwide=AR\ PL\ UKai\ CN\ 16
	"au GUIEnter * call MaximizeWindow()
elseif has('win32')
	"set guioptions+=a clipboard+=unnamed,autoselect
	autocmd GUIEnter * simalt ~x	"设定windows下gvim 启动时最大化

	let idx=localtime() % 12
	if idx==0
		set guifont=monofur:h16
	elseif idx==1
		set guifont=Consolas:h16
	elseif idx==2
		set guifont=Inconsolata-g:h16
	elseif idx==3
		set guifont=Inconsolata:h16
	elseif idx==4
		set guifont=Droid_Sans_Mono_Dotted:h16
	elseif idx==5
		set guifont=Droid_Sans_Mono_Slashed:h16
	elseif idx==6
		set guifont=Liberation_Mono:h16
	elseif idx==7
		set guifont=Monaco:h16
	elseif idx==8
		set guifont=Oxygen:h16
	elseif idx==9
		set guifont=Oxygen_Mono:h16
	elseif idx==10
		set guifont=Andale_Mono:h16
	else
		set guifont=monofur:h16
	"	set guifont=Vera_Sans_YuanTi_Mono:h13.8:w7.6:b,Bitstream\ Vera\ Sans\ Mono:h11.8:w6.7:b,Arial_monospaced_for_SAP:h11.8:w6.7:b
	endif
	if &diff
		set guifont=Menlo:h13
	endif

	if executable('mingw32-make.exe')
		set makeprg=mingw32-make.exe
	endif
	set	directory=b:/temp/ "将所有.swp发入指定目录
	set fileformat=dos
	
	set tags+=E:/develop/tags/tags_core_libs
	set tags+=E:/develop/tags/tags_wxWidgets_include
	set tags+=E:/develop/tags/tags_wxWidgets_msw 

	"hexing_autoload.vim
	"let g:Ctags = $VIMRUNTIME . '/ctags.exe'
	let g:Ctags = 'F:\cygwin\bin\ctags.exe'
	let g:Cscope = 'F:\cygwin\bin\mlcscope.exe'
	let g:TagDirectory = 'b:/tags'
	call hexing#hexing_autoload#HX_LoadTagFiles(g:TagDirectory . '/*.tag')
endif

"map
	vnoremap <C-c> "*y
	vnoremap <C-v> "*P
	inoremap <C-v> "*p
